#include "Coils.h"

Coils::Coils (const char* file_name, int num) {
            number = num;
            FILE* file;
            CoilR = new float[number];
            CoilZ = new float[number];
            CoilI = new float[number];
            file = fopen(file_name, "rb+");
            if (file == NULL) {
                cout << "Error\n";
             
            }
            for (int i=0; i<= number;i++) {
	       fscanf( file, "%f %f %f", &CoilR[i], &CoilZ[i], &CoilI[i]);
            }
            fclose(file); 
            
        }
